#[cfg(test)]
mod tests {
    struct Owner(i32);

    impl Owner {
        // 标注生命周期，就像独立的函数一样。
        fn add_one<'a>(&'a mut self) {
            self.0 += 1;
        }
        fn print<'a>(&'a self) {
            println!("`print`: {}", self.0);
        }
    }

    #[test]
    fn test() {
        let mut owner = Owner(18);

        owner.add_one();
        owner.print();
    }
}
